package com.deram.ctin.dependencies.rest.base;


import com.deram.ctin.common.cache.UserCacheManage;
import com.deram.ctin.common.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * Created by xhw on 2017/09/06.
 */
public class BaseController {

    @Autowired
    private UserCacheManage userCacheManage;

    @Autowired
    private HttpServletRequest request;

    public String create(UserVo user){
        return userCacheManage.create(request, user);
    }

    public UserVo get(){
        return userCacheManage.get(request);
    }

    public void clear(){
        userCacheManage.clear(request);
    }
}
